import request from '@/utils/request'

/**
 * 获取商品评价
 */
export function getEvaluateList(params: Record<string, any>) {
    // return request.get(`shop/goods/evaluate`, params)
    return request.get(`product/comment/page`, params, { isYuDao: true })


}
/**
 * 获取评价详情
 */
export function getEvaluateInfo(id: any) {
    return request.get(`shop/goods/evaluate/${id}`)
}
// /**
//  * 提交评论
//  */
// export function setOrderEvaluate(params: Record<string, any>) {
//     return request.post('shop/goods/evaluate', params, { showSuccessMessage: true })
// }
/**
 * 创建单个评论
 */
export function setOrderEvaluate(data: Record<string, any>) {
    return request.post('trade/order/item/create-comment', data, { isYuDao: true })
}
/**
 * 获取订单评价
 */
export function getOrderEvaluate(id: any) {
    return request.get(`shop/order/evaluate/${id}`)
}
